package com.example.demo;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFTable;

public class DocTest {
	public static void main(String[] args) throws Exception {
		String filePath = "D:"+File.separator+"Develop"+File.separator+"上海昊沧保养报告 (30).docx";
		XWPFDocument document = new XWPFDocument(new FileInputStream(new File(filePath)));
		List<XWPFTable> tables = document.getTables();
		System.out.println(tables);
	}
}
